// 全局样式
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f5f5f5;
}

#app {
  width: 100%;
  min-height: 100vh;
}

// 通用类
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.full-width {
  width: 100%;
}

.full-height {
  height: 100%;
}

// 渐变背景类
.gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-success {
  background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
}

.gradient-warning {
  background: linear-gradient(135deg, #fa8c16 0%, #faad14 100%);
}

.gradient-danger {
  background: linear-gradient(135deg, #f5222d 0%, #ff7875 100%);
}

.gradient-info {
  background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
}

// 卡片样式增强
.van-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  }
}

// 按钮样式增强
.van-button {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;

  &.van-button--primary {
    background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
    border: none;

    &:hover {
      background: linear-gradient(135deg, #40a9ff 0%, #5cdbd3 100%);
    }
  }

  &.van-button--danger {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    border: none;
  }
}

// 输入框样式增强
.van-field__control {
  border-radius: 8px;
}

// 网格项样式
.van-grid-item {
  &:hover {
    transform: translateY(-2px);
    transition: transform 0.2s;
  }
}

// 导航栏样式
.van-nav-bar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

// 弹窗样式
.van-popup {
  border-radius: 12px 12px 0 0;
}

// 加载动画
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: white;

  .van-loading {
    margin-bottom: 16px;
  }
}

// 错误状态样式
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: white;
  text-align: center;

  .error-icon {
    font-size: 64px;
    margin-bottom: 20px;
  }

  h3 {
    margin: 0 0 16px 0;
    font-size: 24px;
  }

  p {
    margin: 0 0 32px 0;
    font-size: 16px;
    opacity: 0.9;
  }
}

// 空状态样式
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #999;
  text-align: center;

  .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
  }

  p {
    margin: 0;
    font-size: 14px;
  }
}

// 响应式设计
@media (max-width: 768px) {
  .content {
    padding: 16px !important;
  }

  .van-card {
    margin-bottom: 16px !important;
  }
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;

  &:hover {
    background: #a8a8a8;
  }
}

// 文本选择样式
::selection {
  background: #1890ff;
  color: white;
}

::-moz-selection {
  background: #1890ff;
  color: white;
}

// 引入AI功能页面通用样式
@import './ai-features-common.css';
